/*
 * commlib.h
 *
 *  Created on: Apr 12, 2015
 *      Author: mxw
 */

#ifndef COMMLIB_H_
#define COMMLIB_H_

void* memset(void* s, int c, unsigned long n);
char* memcpy(char* dst, const char* src, int n);
int strlen(const char* str);
char* strcpyn(char* dst, const char* src, int dst_buf_max);
char* strcpy(char* dst, const char* src);
char* reverse_str(char* s);

int strcmp(const char* s1, const char* s2);

int printf(const char* format, ...);
int printfk(const char* format, ...);

int sprintf(char* buf, const char* format, ...);

//WARNING: This function is only for none-interupt such as privilege mode, because this function worked like block
void delay_ms(int time_ms);

#endif /* COMMLIB_H_ */
